* ======================================
* ----------- Distance plots -----------
* ======================================


	use $dta\EstimationSample.dta, clear

	* Fam1
	preserve
	keep if Fam2 == 1
	drop if Fam2Any == 1 & Fam2Pol_dist == . // Missing distance
	run $prog\prog_distplot "Fam2" 9 3 10 200 5 "small" "vsmall" "medsmall" ///
		"vsmall" "medium" "medium" 5.5 0.06 0.03 0.06 0.03 "Fam2Dist" ///
		"Panel A: Family" Voter_turnout
	restore

	* Work1
	preserve
	keep if Work2 == 1
	drop if Work2Any == 1 & Work2Pol_dist == . // Missing distance
	run $prog\prog_distplot "Work2" 9 3 10 200 5 "small" "vsmall" "medsmall" ///
		"vsmall" "medium" "medium" 5.5 0.04 0.02 0.04 0.02 "Work2Dist" ///
		"Panel B: Co-workers" Voter_turnout
	restore

	* Imm1
	preserve
	keep if Imm2 == 1
	drop if Imm2Any == 1 & Imm2Pol_dist == . // Missing distance
	run $prog\prog_distplot "Imm2" 9 3 10 200 5 "small" "vsmall" "medsmall" ///
		"vsmall" "medium" "medium" 5.5 .12 0.06 .24 0.12 "Imm2Dist" ///
		"Panel C: Immigrants" Voter_turnout
	restore

	graph combine Fam2Dist Work2Dist Imm2Dist, ysize(8) col(1) scheme(plotplain)
	graph export "$figs\DistplotsBroad.pdf",replace

